package io.bdmc.modules.api.controller;

import com.alibaba.fastjson2.JSONObject;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import io.bdmc.common.utils.R;
import io.bdmc.modules.bss.service.IDeviceDeviceService;
import io.bdmc.modules.bss.service.IDeviceFrameService;
import io.bdmc.modules.sys.service.ISysAboutService;
import io.bdmc.core.snmp.SnmpAlarmProcess;
import io.bdmc.core.snmp.SnmpDataCache;

// "测试接口", description = "测试接口")
@RestController
@RequestMapping(value = "/msg")
public class MessageController {

    @Autowired
    SnmpAlarmProcess _proSvs;

    @Autowired
    IDeviceFrameService _deviceframeSvs;

    @Autowired
    IDeviceDeviceService _devSvs;;

    @Autowired
    ISysAboutService _aboutSvs;
    // private Logger logger = LoggerFactory.getLogger(getClass());

    // "测试接口", notes = "测试接口")
    @PostMapping(value = "/ct")
    public R ctmsg(@RequestBody(required = false) JSONObject json) {
        // int channel = Integer.parseInt("CH1".substring("CH1".length() - 1));
        // boolean b =
        // FTPUtils.deleteFile("/sor/20200925083755_IFMS_CH4_SOR_Current.sor");

        String ss = "192.168.1.235,CH2,A,3,5,24.4763,2.04636e-05,0";
        SnmpDataCache.offTrapQueue(ss);
        return R.ok();
    }

}
